package com.wz.project.bas.workshopClass.service;

import com.wz.common.utils.text.Convert;
import com.wz.project.bas.workshopClass.domain.BasWorkshopClass;
import com.wz.project.bas.workshopClass.mapper.WorkshopClassMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorshopClassServiceImpl implements WorkshopClassService {
    @Autowired
    WorkshopClassMapper workshopClassMapper;
    @Override
    public List<BasWorkshopClass> selectWorkshopClassList(BasWorkshopClass basWorkshopClass) {
        return workshopClassMapper.selectWorkshopClassList(basWorkshopClass);
    }

    @Override
    public int deleteWorkshopClassByIds(String ids) {
        String[] userIds = Convert.toStrArray(ids);
        return workshopClassMapper.deleteWorkshopClassByIds(userIds);
    }

    @Override
    public BasWorkshopClass selectWorkshopClassById(String id) {
        return workshopClassMapper.selectWorkshopClassById(id);
    }

    @Override
    public int saveAndUpdate(BasWorkshopClass basWorkshopClass) {
        return workshopClassMapper.saveAndUpdate(basWorkshopClass);
    }

    @Override
    public int insertWorkshopClass(BasWorkshopClass basWorkshopClass) {
        return workshopClassMapper.insertWorkshopClass(basWorkshopClass);
    }
}
